package com.pp.demo.common.constant;

public enum CommonErrorCode implements ErrorCode {

    SYSTEM_ERROR("A0001", "系统异常"),
    PARAM_ERROR("A0002", "参数错误"),
    TIMEOUT_ERROR("A0003", "操作超时"),
    PERMISSION_DENIED("A0004", "权限不足"),
    RESOURCE_NOT_FOUND("A0005", "资源不存在"),
    METHOD_NOT_SUPPORTED("A0006", "方法不支持"),
    ;

    private final String code;
    private final String message;

    CommonErrorCode(String code, String message) {
        this.code = code;
        this.message = message;
    }

    @Override
    public String getCode() {
        return code;
    }

    @Override
    public String getMessage() {
        return message;
    }
}
